package com.mav.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Order(0)
@Slf4j
@Aspect
@Component
public class MyAspect2 {

    @Before("execution(* com.mav.service.iml.*.*(..))")
    public void before(JoinPoint jp){
        String name = jp.getClass().getName();
        Signature signature = jp.getSignature();
        String method = signature.getName();
        Object[] args = jp.getArgs();
        log.info("连接点信息:{},{},{}",name,method,args);
    }

}
